#ifndef __TEXTURE_BRUSH_H__
#define __TEXTURE_BRUSH_H__

#ifdef __apple__
#include "Brush.h"
#include "cxx_0x.h"
#include "Ref.h"
#else
#include "gofgame/common/graphics/Brush.h"
#include "gofgame/common/cxx_0x.h"
#include "gofgame/common/Ref.h"
#endif //__apple__

namespace gofgame {
	namespace common {
		namespace graphics {

			using namespace gofgame::common;

			class TextureBrush : public Brush {
			public:
				TextureBrush(CCTexture2D *texture, Brush *baseBrush);
				virtual bool isTransparent() const _override;
				virtual CCTexture2D *getTexture() const;
				virtual Brush *getBaseBrush() const;

			protected:
				virtual void onFillRect(float left, float top, float width, float height) _override;

			private:
				Ref<CCTexture2D> texture;
				Ref<Brush> baseBrush;
			};
		}
	}
}

#endif //__TEXTURE_BRUSH_H__
